/*
 *Description:
 *User:laoHu
 *Created with Intellij IDEA 2025
 *Data:2025.05.26
 *Time:15:55
 */
public class myData {
    //属性：成员变量
    //默认值
    public int year = 2025;
    public int month = 5;
    public int day = 26;

    //构成方法
    //当前谁调用此方法，this就代表该对象
    public myData(){
         this(2022,6,6);
    }

    public myData(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    //打印方法
//    public void printData(){
//
//        System.out.println(year + "." + month + "." + day);
//    }

    @Override
    public String toString() {
        return "myData{" +
                "year=" + year +
                " month=" + month +
                " day=" + day +
                '}';
    }
}
